package objectcreate;

public class Videogame {

    public String name;
    public char rating;

    Videogame() {
        name = "";
        rating = 'E';
    }

    Videogame(String n, char r) {
        name = n;
        rating = r;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the rating
     */
    public char getRating() {
        return rating;
    }

    /**
     * @param rating the rating to set
     */
    public void setRating(char rating) {
        this.rating = rating;
    }

    public String printgame() {
        return name + "\nRated: " + rating;
    }
    public String export()
    {
        return name + "," + rating;
    }
}
